package com.example.myapplication.danmu

import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
import androidx.databinding.DataBindingUtil
import com.example.myapplication.R
import com.example.myapplication.databinding.ViewPackageRewardDanmuBinding

/**
 * @author: rongfeng
 * @date: 2022/3/10
 * @description
 */
class PackageRewardDanmuView @JvmOverloads constructor(
        context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {

    var binding : ViewPackageRewardDanmuBinding? = null
    init {
        binding = DataBindingUtil.bind( View.inflate(context, R.layout.view_package_reward_danmu, this))
    }

    fun setData(content:String){
        binding!!.tvContent .text=content

//         layoutParams.width= DisplayUtils.dp2px(500)
    }

}